package com.appwoo.txtws.component;

import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.text.TextUtils;

public class NetworkUtils
{
  public static boolean cmwap2Cmnet(Context paramContext)
  {
    return new UpdateAPN(paramContext).updateApn();
  }

  public static boolean isCmnet(Context paramContext)
  {
    ConnectivityManager localConnectivityManager = (ConnectivityManager)paramContext.getSystemService("connectivity");
    if (localConnectivityManager == null);
    String str;
    do
    {
      NetworkInfo localNetworkInfo;
      do
      {
        return false;
        localNetworkInfo = localConnectivityManager.getActiveNetworkInfo();
      }
      while (localNetworkInfo == null);
      str = localNetworkInfo.getExtraInfo();
    }
    while ((TextUtils.isEmpty(str)) || (str.length() < 3) || (str.toLowerCase().indexOf("net") <= 0));
    return true;
  }

  public static boolean isCmwap(Context paramContext)
  {
    if (paramContext == null);
    String str;
    do
    {
      NetworkInfo localNetworkInfo;
      do
      {
        ConnectivityManager localConnectivityManager;
        do
        {
          return false;
          localConnectivityManager = (ConnectivityManager)paramContext.getSystemService("connectivity");
        }
        while (localConnectivityManager == null);
        localNetworkInfo = localConnectivityManager.getActiveNetworkInfo();
      }
      while (localNetworkInfo == null);
      str = localNetworkInfo.getExtraInfo();
    }
    while ((TextUtils.isEmpty(str)) || (str.length() < 3) || (str.toLowerCase().indexOf("wap") <= 0));
    return true;
  }
}

/* Location:           C:\Documents and Settings\Administrator\classes_dex2jar.jar
 * Qualified Name:     com.appwoo.txtws.component.NetworkUtils
 * JD-Core Version:    0.6.2
 */